package com.framework.shs.a.dao.impl;

import org.springframework.stereotype.Repository;

import com.framework.shs.a.dao.UserDao;
import com.framework.shs.a.entity.User;
import com.framework.shs.commom.base.impl.BaseDaoImpl;

@Repository
public class UserDaoImpl extends BaseDaoImpl<User> implements UserDao {

	@Override
	public User test() {
		return get("1");
	}

	@Override
	public User findByName(String username) {
		return (User) getSession().createQuery("from User where loginName =?")
				.setString(0, username).uniqueResult();
	}

}
